package com.pmcc.cj.entity.vo;

import com.pmcc.cj.entity.CjAreaAgency;

import java.util.List;

/**
 * Created by tomas on 2020/10/3.
 */
public class AgencyVo extends CjAreaAgency {
    private List<AgencyVo> children;
    private String title;
    private String key;

    public List<AgencyVo> getChildren() {
        return children;
    }

    public void setChildren(List<AgencyVo> children) {
        this.children = children;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public static AgencyVo getAgencyVo(CjAreaAgency areaAgency){
        AgencyVo agencyVo = new AgencyVo();
        if(agencyVo != null){
            agencyVo.setTitle(areaAgency.getActivationCode());
            agencyVo.setId(areaAgency.getId());
            agencyVo.setParentId(areaAgency.getParentId());
            agencyVo.setAddress(areaAgency.getAddress());
            agencyVo.setCode(areaAgency.getCode());
            agencyVo.setActivationCode(areaAgency.getActivationCode());
            agencyVo.setBoActive(areaAgency.getBoActive());
            agencyVo.setUseDate(areaAgency.getUseDate());
            agencyVo.setEmployee(areaAgency.getEmployee());
        }
        return agencyVo;
    }
}
